
import { WrapperLayouts } from '../components';
import LoginView from '../views/LoginView.vue';

// 1. 定义路由组件， 注意，这里一定要使用 文件的全名（包含文件后缀名）
const routes = [
    { 
      path: "/",
      component: WrapperLayouts,
      children: [
          {
              path: '/page/:id',
              name: 'page',
              component: () => import('../views/Page.vue'),
              children: [
                {
                  path: '/page/:id(.*)*',
                  // redirect: `/page/${Object.keys(menuMap)[0]}`,
                  name: 'page',
                  component: () => import('../views/Page.vue')
                }
              ]
          }
      ]
    },
    {
      path: '/login',
      component: LoginView
    },
  ];

  export {
    routes
  };